/**
 * Created by wingsfrog on 2017/6/23.
 */
import {Injectable} from "@angular/core";
import {HttpUtils} from "../utils/http.utils";
import {USER} from "../service/user.service";
import {ParamsModel} from "../model/params.model";
import {PageParam} from "./api.service";

@Injectable()
export class ACTIVITY {

  activityListApi : string = '/activity/entering';
  detailApi:string = ''
  constructor(private api: HttpUtils,private USER:USER) {

  }

  getList(succ,page?:PageParam){
    let pm = new ParamsModel(this.USER);
    pm.url = this.activityListApi;
    pm.reqestData = page;
    pm.succCallback = succ;
    this.api.get(pm);
  }
  getDetail(id,success){
    let pm = new ParamsModel(this.USER);
    pm.url = `/activity/${id}`;
    pm.succCallback = success;
    this.api.get(pm);
  }
}
